home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 96000tar.z / 96000tar / 96000 / appb / b18.asm < prev    next >
Assembly Source File  |  1992-04-28  |  2KB  |  32 lines

  1. ; This program was originally published in the Motorola DSP96002 Users Manual
  2. ; and is provided under a DISCLAIMER OF WARRANTY available from Motorola DSP
  3. ; Operation, 6501 William Cannon Drive West, Austin, Texas 78735-8598.  For
  4. ; more information, refer to the DSP96002 Users Manual, Appendix B, DSP
  5. ; Benchmarks.
  6. ;
  7. ; B.1.8    N Complex Multiplies  
  8. ;   cr(I) + jci(I) = ( ar(I) + jai(I) ) * ( br(I) + jbi(I) ), I=1,...,N 
  9. ;   cr(I) = ar(I) * br(I) - ai(I) * bi(I) 
  10. ;   ci(I) = ar(I) * bi(I) + ai(I) * br(I) 
  11. ;       R1 ? cr,ci      R0 ?  ar,ai     R4 ? br,bi 
  12. ;       D5 = ar  D6 = bi  D4 = br  D7 = ai 
  13. ;                                                            Program    ICycles
  14. ;                                                            Words 
  15.     move   #aaddr,r0                                              ;    1          1 
  16.     move   #baddr,r4                                              ;    1          1 
  17.     move   #caddr-1,r1                                            ;    1          1 
  18.     move                           x:(r0),d5.s      y:(r4),d6.s   ;    1          1 
  19.     fmpy.s  d6,d5,d1               x:(r4)+,d4.s     y:(r0)+,d7.s  ;    1          1 
  20.     fmpy.s  d4,d7,d2                                              ;    1          1 
  21.     do    #N,_end                                                 ;    2          3 
  22.     fmpy    d6,d7,d2 fadd.s d2,d1                   y:(r0),d7.s   ;    1          1 
  23.     fmpy.s  d4,d5,d0               x:(r0)+,d5.s     y:(r4),d6.s   ;    1          1 
  24.     fmpy    d6,d5,d1 fsub.s d2,d0  x:(r4)+,d4.s     d1.s,y:(r1)   ;    1          1 
  25.     fmpy.s  d4,d7,d2               d0.s,x:(r1)+                   ;    1          1 
  26. _end                                                         ;    ---        --- 
  27. ;                                                        Totals:      12     4N+9 
  28. ;                                                                (    12     4N+9) 
  29.  
  30.